From 26ca465bd168555b450c707159a5a29addb03bf6 Mon Sep 17 00:00:00 2001 From: Iqbal Ansari Date: Sat, 10 Oct 2015 18:38:08 +0530 Subject: [PATCH] Manually flush headings for keybindings --- which-key.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/which-key.el b/which-key.el index 14fc5b050d4..7e07631e7b4 100644 --- a/which-key.el +++ b/which-key.el @@ -1262,6 +1262,7 @@ BUFFER that follow the key sequence KEY-SEQ." ;; C-x 8 Prefix Command ;; Prefix Command "^\\([^ <>\t]+\\|\\)[ \t]+\\([^\t\n]+\\)$")) + (lines-to-flush'("[bB]inding[s]?[:]?$" "translations:$" "-------$")) key-match desc-match unformatted) (save-match-data (with-temp-buffer @@ -1269,6 +1270,9 @@ BUFFER that follow the key sequence KEY-SEQ." (when which-key-hide-alt-key-translations (goto-char (point-min)) (flush-lines "^A-")) + (goto-char (point-min)) + (dolist (line-to-flush lines-to-flush) + (save-excursion (flush-lines line-to-flush))) (goto-char (point-max)) ; want to put last keys in first (while (re-search-backward keybinding-regex nil t) (setq key-match (match-string 1) -- 2.30.2